package com.ss.SmartStock.mapper;

import com.ss.SmartStock.pojo.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-06-17
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据id查询用户姓名
     * @param id
     * @return
     */
    @Select("select user_name from user where id={id}")
    User selectNameById(Long id);
}
